home *** CD-ROM | disk | FTP | other *** search
/ Enter 2003 April / EnterCD 4_2003.iso / Multimedia / AlbumCreator 2.5 / AC2.exe / christmas2.swf / scripts / frame_6 / DoAction.as
Encoding:
Text File  |  2002-11-27  |  892 b   |  61 lines

  1. do
  2. {
  3.    light = (light + 90 + Math.random() * 20) / 2;
  4. }
  5. while(Math.round(light) == 100);
  6.  
  7. c = new Color(bg);
  8. c.setTransform({ra:light,rb:"0",ga:light,gb:"0",ba:light,bb:"0",aa:"100",ab:"0"});
  9. if(tracker._x < 800 && tracker._x > 620)
  10. {
  11.    if(tracker._y < 100)
  12.    {
  13.       speed = 20;
  14.    }
  15.    else if(tracker._y > 380)
  16.    {
  17.       speed = -20;
  18.    }
  19.    else
  20.    {
  21.       speed = 0;
  22.    }
  23. }
  24. else
  25. {
  26.    speed = 0;
  27. }
  28. if(speed < 0)
  29. {
  30.    if(thumbs[thumbs.length - 1]._y > 420)
  31.    {
  32.       i = 0;
  33.       while(i < thumbs.length)
  34.       {
  35.          thumbs[i]._y += speed;
  36.          i++;
  37.       }
  38.    }
  39.    else
  40.    {
  41.       speed = 0;
  42.    }
  43. }
  44. else if(speed > 0)
  45. {
  46.    if(thumbs[0]._y < 60)
  47.    {
  48.       i = 0;
  49.       while(i < thumbs.length)
  50.       {
  51.          thumbs[i]._y += speed;
  52.          i++;
  53.       }
  54.    }
  55.    else
  56.    {
  57.       speed = 0;
  58.    }
  59. }
  60. gotoAndPlay(5);
  61.